package org.example.base;

public class IntTest {
    public static void main(String[] args) {
//        Integer a = new Integer(123);
//        Integer b = new Integer(123);

        Integer a = 123;
        Integer b = 123;
        int c = 123;
        Integer d = new Integer(123);
        Integer e = 120 + 3;
        Integer f = 120 + new Integer(3);

//        Integer a = Integer.valueOf(123);
//        Integer b = Integer.valueOf(123);

//        Integer a = Integer.valueOf(1234);
//        Integer b = Integer.valueOf(1234);

        System.out.println(a == b);
        System.out.println(a == c);
        System.out.println(a == d);
        System.out.println(a == e);
        System.out.println(a == f);

        int x = 1234;
        int y = 1234;

        System.out.println(x == y);

        short s1 = Short.MAX_VALUE;
//        s1 = s1 + 1;
//        s1 += 1;
//        System.out.println("s1 = " + s1);
    }
}
